package your.pachet;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

public class Meteo extends Activity {
	

		
	
	
	
	public void onCreate(Bundle icicle)
	   {
	      super.onCreate(icicle);
	     setContentView(R.layout.meteo) ;
	    
	     Intent inten=getIntent();
	     
	     Button b = (Button) findViewById(R.id.btn);
	      b.setOnClickListener(new View.OnClickListener() {
	         public void onClick(View arg0) {
	         setResult(0);
	         finish();
	         } 
	      }); 
	     
	     
	     
	     TextView data1=(TextView)findViewById(R.id.data);
	     ImageView imag1=(ImageView)findViewById(R.id.img1);
	     TextView cond1=(TextView)findViewById(R.id.condition);
	     TextView temp1=(TextView)findViewById(R.id.temp);
	     TextView umid1=(TextView)findViewById(R.id.umiditate);
	     TextView vant1=(TextView)findViewById(R.id.vant1);
	     TextView maine=(TextView)findViewById(R.id.maine);
	     ImageView imag2=(ImageView)findViewById(R.id.imageView2);
	     TextView cond2=(TextView)findViewById(R.id.condition2);
	     TextView low2=(TextView)findViewById(R.id.low2);
	     TextView poimaine=(TextView)findViewById(R.id.poimaine);
	     ImageView imag3=(ImageView)findViewById(R.id.imageView3);
	     TextView cond3=(TextView)findViewById(R.id.condition3);
	     TextView low3=(TextView)findViewById(R.id.low3);
	     TextView raspoimaine=(TextView)findViewById(R.id.raspoimaine);
	     ImageView imag4=(ImageView)findViewById(R.id.imageView4);
	     TextView cond4=(TextView)findViewById(R.id.condition4);
	     TextView low4=(TextView)findViewById(R.id.low4);
	     
	     
	     
	   String prog=inten.getStringExtra("poza1");  
	   
	   if(prog.equalsIgnoreCase("/ig/images/weather/mostly_sunny.gif")) imag1.setImageResource(R.drawable.mostly_sunny);
	   
		
		else if(prog.equalsIgnoreCase("/ig/images/weather/chance_of_snow.gif"))
		
			imag1.setImageResource(R.drawable.chance_of_snow);	
		
		else if (prog.equalsIgnoreCase("/ig/images/weather/chance_of_storm.gif"))
		{
			imag1.setImageResource(R.drawable.chance_of_storm);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/chance_of_tstorm.gif"))
		{
			imag1.setImageResource(R.drawable.chance_of_tstorm);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/cloudy.gif"))
		{
			imag1.setImageResource(R.drawable.cloudy);
		}
		else if(prog.equalsIgnoreCase("/ig/images/weather/Dust.gif"))
		{
			imag1.setImageResource(R.drawable.dust);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Flurries.gif"))
		{
			imag1.setImageResource(R.drawable.flurries);
		}
		else if (prog.equals("/ig/images/weather/Fog.gif"))
		{
			imag1.setImageResource(R.drawable.fog);
		}
		else if(prog.equalsIgnoreCase("/ig/images/weather/Haze.gif"))
		{
			imag1.setImageResource(R.drawable.haze);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Icy.gif"))
		{
			imag1.setImageResource(R.drawable.icy);
		}
		else if(prog.equalsIgnoreCase("/ig/images/weather/Mist.gif"))
		{
			imag1.setImageResource(R.drawable.mist);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Mostly_Cloudy.gif"))
		{
			imag1.setImageResource(R.drawable.mostly_cloudy);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Mostly_Sunny.gif"))
		{
			imag1.setImageResource(R.drawable.mostly_sunny);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Partly_Cloudy.gif"))
		{
			imag1.setImageResource(R.drawable.partly_cloudy);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Rain.gif"))
		{
			imag1.setImageResource(R.drawable.rain);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Sleet.gif"))
		{
			imag1.setImageResource(R.drawable.sleet);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Smoke.gif"))
		{
			imag1.setImageResource(R.drawable.smoke);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Snow.gif"))
		{
			imag1.setImageResource(R.drawable.snow);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Storm.gif"))
		{
			imag1.setImageResource(R.drawable.storm);
		}
		else if (prog.equalsIgnoreCase("/ig/images/weather/Sunny.gif"))
		{
			imag1.setImageResource(R.drawable.sunny);
		}
		else if(prog.equalsIgnoreCase("/ig/images/weather/thunderstorm.gif")) imag1.setImageResource(R.drawable.thunderstorm);
		else if(prog.equalsIgnoreCase("/ig/images/weather/chance_of_rain.gif")) imag1.setImageResource(R.drawable.chance_of_rain);
		
	  
	   
	   
	   
	     
	     data1.setText("Data:"+inten.getStringExtra("data1")); 
	     cond1.setText("Conditii:"+inten.getStringExtra("condition"));
	     temp1.setText("Temperatura:"+inten.getStringExtra("temp1"));
	     umid1.setText(inten.getStringExtra("umid1"));
	     vant1.setText(inten.getStringExtra("vant1"));
	     maine.setText("Zi:"+inten.getStringExtra("maine"));
	     cond2.setText("Conditii:"+inten.getStringExtra("cond2"));
	     int c=Integer.parseInt(inten.getStringExtra("low2"));
	     low2.setText("Minim:"+ (c- 32) * 5 / 9);
	     poimaine.setText("Zi:"+inten.getStringExtra("poimaine"));
	     cond3.setText("Conditii:"+inten.getStringExtra("cond3"));
	      c=Integer.parseInt(inten.getStringExtra("low3"));
	     low3.setText("Minim:"+(c- 32) * 5 / 9); 
	     raspoimaine.setText("Zi:"+inten.getStringExtra("raspoimaine"));
	     cond4.setText("Conditii:"+inten.getStringExtra("cond4"));
	     c=Integer.parseInt(inten.getStringExtra("low4"));
	     low4.setText("Minim:"+(c- 32) * 5 / 9);
	     
	     
	      prog=inten.getStringExtra("poza2");  
		   
		   if(prog.equalsIgnoreCase("/ig/images/weather/mostly_sunny.gif")) imag2.setImageResource(R.drawable.mostly_sunny);
		   
			
			else if(prog.equalsIgnoreCase("/ig/images/weather/chance_of_snow.gif"))
			
				imag2.setImageResource(R.drawable.chance_of_snow);	
			
			else if (prog.equalsIgnoreCase("/ig/images/weather/chance_of_storm.gif"))
			{
				imag2.setImageResource(R.drawable.chance_of_storm);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/chance_of_tstorm.gif"))
			{
				imag2.setImageResource(R.drawable.chance_of_tstorm);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/cloudy.gif"))
			{
				imag2.setImageResource(R.drawable.cloudy);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/Dust.gif"))
			{
				imag2.setImageResource(R.drawable.dust);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Flurries.gif"))
			{
				imag2.setImageResource(R.drawable.flurries);
			}
			else if (prog.equals("/ig/images/weather/Fog.gif"))
			{
				imag2.setImageResource(R.drawable.fog);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/Haze.gif"))
			{
				imag2.setImageResource(R.drawable.haze);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Icy.gif"))
			{
				imag2.setImageResource(R.drawable.icy);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/Mist.gif"))
			{
				imag2.setImageResource(R.drawable.mist);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Mostly_Cloudy.gif"))
			{
				imag2.setImageResource(R.drawable.mostly_cloudy);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Mostly_Sunny.gif"))
			{
				imag2.setImageResource(R.drawable.mostly_sunny);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Partly_Cloudy.gif"))
			{
				imag2.setImageResource(R.drawable.partly_cloudy);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Rain.gif"))
			{
				imag2.setImageResource(R.drawable.rain);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Sleet.gif"))
			{
				imag2.setImageResource(R.drawable.sleet);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Smoke.gif"))
			{
				imag2.setImageResource(R.drawable.smoke);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Snow.gif"))
			{
				imag2.setImageResource(R.drawable.snow);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Storm.gif"))
			{
				imag2.setImageResource(R.drawable.storm);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Sunny.gif"))
			{
				imag2.setImageResource(R.drawable.sunny);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/thunderstorm.gif")) imag2.setImageResource(R.drawable.thunderstorm);
			else if(prog.equalsIgnoreCase("/ig/images/weather/chance_of_rain.gif")) imag2.setImageResource(R.drawable.chance_of_rain);
		   
		   
		   
		   
		   
		   
		   prog=inten.getStringExtra("poza3");  
		   
		   if(prog.equalsIgnoreCase("/ig/images/weather/mostly_sunny.gif")) imag3.setImageResource(R.drawable.mostly_sunny);
		   
			
			else if(prog.equalsIgnoreCase("/ig/images/weather/chance_of_snow.gif"))
			
				imag3.setImageResource(R.drawable.chance_of_snow);	
			
			else if (prog.equalsIgnoreCase("/ig/images/weather/chance_of_storm.gif"))
			{
				imag3.setImageResource(R.drawable.chance_of_storm);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/chance_of_tstorm.gif"))
			{
				imag3.setImageResource(R.drawable.chance_of_tstorm);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/cloudy.gif"))
			{
				imag3.setImageResource(R.drawable.cloudy);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/Dust.gif"))
			{
				imag3.setImageResource(R.drawable.dust);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Flurries.gif"))
			{
				imag3.setImageResource(R.drawable.flurries);
			}
			else if (prog.equals("/ig/images/weather/Fog.gif"))
			{
				imag3.setImageResource(R.drawable.fog);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/Haze.gif"))
			{
				imag3.setImageResource(R.drawable.haze);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Icy.gif"))
			{
				imag3.setImageResource(R.drawable.icy);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/Mist.gif"))
			{
				imag3.setImageResource(R.drawable.mist);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Mostly_Cloudy.gif"))
			{
				imag3.setImageResource(R.drawable.mostly_cloudy);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Mostly_Sunny.gif"))
			{
				imag3.setImageResource(R.drawable.mostly_sunny);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Partly_Cloudy.gif"))
			{
				imag3.setImageResource(R.drawable.partly_cloudy);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Rain.gif"))
			{
				imag3.setImageResource(R.drawable.rain);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Sleet.gif"))
			{
				imag3.setImageResource(R.drawable.sleet);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Smoke.gif"))
			{
				imag3.setImageResource(R.drawable.smoke);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Snow.gif"))
			{
				imag3.setImageResource(R.drawable.snow);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Storm.gif"))
			{
				imag3.setImageResource(R.drawable.storm);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Sunny.gif"))
			{
				imag3.setImageResource(R.drawable.sunny);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/thunderstorm.gif")) imag3.setImageResource(R.drawable.thunderstorm);
			else if(prog.equalsIgnoreCase("/ig/images/weather/chance_of_rain.gif")) imag3.setImageResource(R.drawable.chance_of_rain); 
		   
		   
		   
		   
		   
		   
		   
		   
		   prog=inten.getStringExtra("poza4");  
		   
		   if(prog.equalsIgnoreCase("/ig/images/weather/mostly_sunny.gif")) imag4.setImageResource(R.drawable.mostly_sunny);
		   
			
			else if(prog.equalsIgnoreCase("/ig/images/weather/chance_of_snow.gif"))
			
				imag4.setImageResource(R.drawable.chance_of_snow);	
			
			else if (prog.equalsIgnoreCase("/ig/images/weather/chance_of_storm.gif"))
			{
				imag4.setImageResource(R.drawable.chance_of_storm);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/chance_of_tstorm.gif"))
			{
				imag4.setImageResource(R.drawable.chance_of_tstorm);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/cloudy.gif"))
			{
				imag4.setImageResource(R.drawable.cloudy);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/Dust.gif"))
			{
				imag4.setImageResource(R.drawable.dust);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Flurries.gif"))
			{
				imag4.setImageResource(R.drawable.flurries);
			}
			else if (prog.equals("/ig/images/weather/Fog.gif"))
			{
				imag4.setImageResource(R.drawable.fog);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/Haze.gif"))
			{
				imag4.setImageResource(R.drawable.haze);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Icy.gif"))
			{
				imag4.setImageResource(R.drawable.icy);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/Mist.gif"))
			{
				imag4.setImageResource(R.drawable.mist);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Mostly_Cloudy.gif"))
			{
				imag4.setImageResource(R.drawable.mostly_cloudy);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Mostly_Sunny.gif"))
			{
				imag4.setImageResource(R.drawable.mostly_sunny);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Partly_Cloudy.gif"))
			{
				imag4.setImageResource(R.drawable.partly_cloudy);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Rain.gif"))
			{
				imag4.setImageResource(R.drawable.rain);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Sleet.gif"))
			{
				imag4.setImageResource(R.drawable.sleet);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Smoke.gif"))
			{
				imag4.setImageResource(R.drawable.smoke);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Snow.gif"))
			{
				imag4.setImageResource(R.drawable.snow);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Storm.gif"))
			{
				imag4.setImageResource(R.drawable.storm);
			}
			else if (prog.equalsIgnoreCase("/ig/images/weather/Sunny.gif"))
			{
				imag4.setImageResource(R.drawable.sunny);
			}
			else if(prog.equalsIgnoreCase("/ig/images/weather/thunderstorm.gif")) imag4.setImageResource(R.drawable.thunderstorm);
			else if(prog.equalsIgnoreCase("/ig/images/weather/chance_of_rain.gif")) imag4.setImageResource(R.drawable.chance_of_rain);	   
		   
		   
	      
	      
	   }	
	
	
	
	
	
	
	
	
	

}
